<?php

use Illuminate\Support\Facades\Route;

use App\Http\Controllers\web\ProductController;
use App\Http\Controllers\web\UserLoginController;
use App\Http\Controllers\web\ProductBoundController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

/**
 *支付
 */
Route::prefix('pay')->group(function () {
    Route::post('payList', [\App\Http\Controllers\web\PaymentController::class, 'payList']);
    Route::post('payInsert', [\App\Http\Controllers\web\PaymentController::class, 'payInsert']);
    Route::get('payDel', [\App\Http\Controllers\web\PaymentController::class, 'payDel']);
    Route::post('payUp', [\App\Http\Controllers\web\PaymentController::class, 'payUp']);
});

//cqf  跳转后台日志记录页面
Route::get('logs', [\Rap2hpoutre\LaravelLogViewer\LogViewerController::class, 'index']);

//hsx
//拼团列表
Route::get('groupList', [\App\Http\Controllers\web\GroupController::class, 'groupList']);
//选择商品
Route::get('selectGoods', [\App\Http\Controllers\web\GroupController::class, 'selectGoods']);
//添加拼团
Route::post('addGroup', [\App\Http\Controllers\web\GroupController::class, 'addGroup']);
//删除拼团
Route::get('delGroup', [\App\Http\Controllers\web\GroupController::class, 'delGroup']);
//拼团详情
Route::get('groupDetails', [\App\Http\Controllers\web\GroupController::class, 'groupDetails']);
//拼团修改
Route::post('groupAlter', [\App\Http\Controllers\web\GroupController::class, 'groupAlter']);

Route::post('addCollageGoods', [\App\Http\Controllers\web\GroupController::class, 'addCollageGoods']);

Route::get('delCollageGoods', [\App\Http\Controllers\web\GroupController::class, 'delCollageGoods']);

Route::get('detailsCollageGoods', [\App\Http\Controllers\web\GroupController::class, 'detailsCollageGoods']);

Route::post('updateCollageGoods', [\App\Http\Controllers\web\GroupController::class, 'updateCollageGoods']);

//拼团商品列表
Route::get('CollageGoodsList', [\App\Http\Controllers\web\GroupController::class, 'CollageGoodsList']);
//添加拼团商品
Route::post('addCollageGoods', [\App\Http\Controllers\web\GroupController::class, 'addCollageGoods']);
//删除拼团商品
Route::get('delCollageGoods', [\App\Http\Controllers\web\GroupController::class, 'delCollageGoods']);
//拼团商品详情
Route::get('detailsCollageGoods', [\App\Http\Controllers\web\GroupController::class, 'detailsCollageGoods']);
//拼团商品修改
Route::post('updateCollageGoods', [\App\Http\Controllers\web\GroupController::class, 'updateCollageGoods']);
//修改拼团商品状态
Route::get('changeDiscountStatus', [\App\Http\Controllers\web\GroupController::class, 'changeDiscountStatus']);
//选择商品
Route::get('selectStoreProduct', [\App\Http\Controllers\web\GroupController::class, 'selectStoreProduct']);
//查询商品信息
Route::get('storeProductFind', [\App\Http\Controllers\web\GroupController::class, 'storeProductFind']);



/**
 * zyy
 */
Route::group(["prefix" => "commission"], function () {
//    列表查询
    Route::get("comWithHeadWithOrder", [\App\Http\Controllers\web\CommissionController::class, "comWithHeadWithOrder"]);
//    搜索查询
    Route::get("comSearch", [\App\Http\Controllers\web\CommissionController::class, "comSearch"]);
//    根据团购商品的价钱计算流水
    Route::get("comOrderStatus", [\App\Http\Controllers\web\CommissionController::class, "comOrderStatus"]);
//    excel上传
    Route::get("commissionExcel", [\App\Http\Controllers\web\CommissionController::class, "commissionExcel"]);
//    提现
    Route::get("withDraw", [\App\Http\Controllers\web\CommissionController::class, "withDraw"]);
});
//全部评论
Route::get('shopRemarkAll', [\App\Http\Controllers\web\ShopController::class, 'shopRemarkAll']);
//删除评论
Route::get('shopRemarkDel', [\App\Http\Controllers\web\ShopController::class, 'shopRemarkDel']);
Route::get('shopRemarkAll', [\App\Http\Controllers\api\ShopController::class, 'shopRemarkAll']);
//积分模块 wsl
Route::prefix('integral')->group(function () {
    //积分流动记录
    Route::post('integralRecordingQuery', [\App\Http\Controllers\api\IntegralController::class, 'integralRecordingQuery']);
    //积分流动记录删除
    Route::post('integralRecordingDelete', [\App\Http\Controllers\api\IntegralController::class, 'integralRecordingDelete']);
});


//砍价后台
/**
 *   lrq 7.18
 */

//砍价
Route::prefix('bargain')->group(function () {

    //砍价商品
    Route::get('index', [\App\Http\Controllers\web\BargainController::class, 'index'])->name('index');
    //砍价列表
    Route::get('bargainList', [\App\Http\Controllers\web\BargainController::class, 'bargainList'])->name('bargainList');
    //砍价商品状态修改
    Route::get('bargainStatus', [\App\Http\Controllers\web\BargainController::class, 'bargainStatus'])->name('bargainStatus');
    //砍价商品删除
    Route::get('bargainDel', [\App\Http\Controllers\web\BargainController::class, 'bargainDel'])->name('bargainDel');
    //砍价商品添加
    Route::post('bargainCreate', [\App\Http\Controllers\web\BargainController::class, 'bargainCreate'])->name('bargainCreate');
    //砍价商品修改
    Route::get('bargainRevamp', [\App\Http\Controllers\web\BargainController::class, 'bargainRevamp'])->name('bargainRevamp');
    //砍价商品修改
    Route::post('bargainUpdate', [\App\Http\Controllers\web\BargainController::class, 'bargainUpdate'])->name('bargainUpdate');
    //砍价商品搜索

    Route::get('searchData',[\App\Http\Controllers\web\BargainController::class,'searchData'])->name('searchData');
    //砍价列表商品搜索
    Route::get('searchListData',[\App\Http\Controllers\web\BargainController::class,'searchListData'])->name('searchListData');
    //商品列表
    Route::get('shopList',[\App\Http\Controllers\web\BargainController::class,'shopList'])->name('shopList');
    //商品列表
    Route::post('uploadPictures',[\App\Http\Controllers\web\BargainController::class,'uploadPictures'])->name('uploadPictures');
    //商品sku
    Route::get('getSku',[\App\Http\Controllers\web\BargainController::class,'getSku'])->name('getSku');
    //订单
    Route::get('getOrder',[\App\Http\Controllers\web\BargainController::class,'getOrder'])->name('getOrder');
    //订单删除
    Route::get('orderDel',[\App\Http\Controllers\web\BargainController::class,'orderDel'])->name('orderDel');
    //订单搜索
    Route::get('searchOrder',[\App\Http\Controllers\web\BargainController::class,'searchOrder'])->name('searchOrder');
    //订单修改1
    Route::get('getOrderOne',[\App\Http\Controllers\web\BargainController::class,'getOrderOne'])->name('getOrderOne');
    //订单修改2
    Route::post('getOrderAdd',[\App\Http\Controllers\web\BargainController::class,'getOrderAdd'])->name('getOrderAdd');
    //设置规则
    Route::post('goodsSet',[\App\Http\Controllers\web\BargainController::class,'goodsSet'])->name('goodsSet');
    //分销
    Route::get('getInfinite',[\App\Http\Controllers\web\BargainController::class,'getInfinite'])->name('getInfinite');
});
//分销
Route::prefix('distribution')->group(function(){
    //会员设置
    Route::post('memberSet',[\App\Http\Controllers\web\DistributionController::class,'memberSet'])->name('memberSet');
    //获取设置
    Route::get('getSet',[\App\Http\Controllers\web\DistributionController::class,'getSet'])->name('getSet');
    //列表
    Route::get('enterList',[\App\Http\Controllers\web\DistributionController::class,'enterList'])->name('enterList');
    //单条数据
    Route::get('getDistribution',[\App\Http\Controllers\web\DistributionController::class,'getDistribution'])->name('getDistribution');
    //分销删除
    Route::get('distributionDel',[\App\Http\Controllers\web\DistributionController::class,'distributionDel'])->name('distributionDel');
    //修改
    Route::post('distributionUpdate',[\App\Http\Controllers\web\DistributionController::class,'distributionUpdate'])->name('distributionUpdate');
    //添加
    Route::post('distributionAdd',[\App\Http\Controllers\web\DistributionController::class,'distributionAdd'])->name('distributionAdd');
    //佣金记录
    Route::get('getRecord',[\App\Http\Controllers\web\DistributionController::class,'getRecord'])->name('getRecord');
    //佣金记录搜索
    Route::get('recordSearch',[\App\Http\Controllers\web\DistributionController::class,'recordSearch'])->name('recordSearch');

    Route::get('searchData', [\App\Http\Controllers\web\BargainController::class, 'searchData'])->name('searchData');


});

//仓库
Route::prefix('admin')->group(function () {
//    仓库查询
    Route::get('warehouseList', [\App\Http\Controllers\web\warehouseController::class, 'warehouseList']);
//    仓库添加
    Route::post('CreateWarehouse', [\App\Http\Controllers\web\warehouseController::class, 'CreateWarehouse']);
//    仓库修改
    Route::post('warehouseUpdate', [\App\Http\Controllers\web\warehouseController::class, 'warehouseUpdate']);
//     入库商品查询
    Route::get('InWarehouse', [\App\Http\Controllers\web\warehouseController::class, 'InWarehouse']);
//    入库商品添加
    Route::post('createInWarehouse', [\App\Http\Controllers\web\warehouseController::class, 'createInWarehouse']);
//    入库商品修改
    Route::post('updateInWarehouse', [\App\Http\Controllers\web\warehouseController::class, 'updateInWarehouse']);
//    入库商品删除
    Route::delete('deleteInWarehouse', [\App\Http\Controllers\web\warehouseController::class, 'deleteInWarehouse']);
//    出库商品查询
    Route::get('ToWarehouse', [\App\Http\Controllers\web\warehouseController::class, 'ToWarehouse']);
//    出库商品添加
    Route::post('createToWarehouse', [\App\Http\Controllers\web\warehouseController::class, 'createToWarehouse']);
//    出库商品修改
    Route::post('updateToWarehouse', [\App\Http\Controllers\web\warehouseController::class, 'updateToWarehouse']);
//    出库商品删除
    Route::delete('deleteToWarehouse', [\App\Http\Controllers\web\warehouseController::class, 'deleteToWarehouse']);

});



//门店
Route::prefix('shop')->group(function () {

//    门店中商品查询
    Route::get('ShopGoods', [\App\Http\Controllers\web\Shop::class, 'ShopGoods']);
//    门店查询
    Route::get('shopList', [\App\Http\Controllers\web\Shop::class, 'shopList']);
});
//商品分类展示
Route::prefix('category')->group(function () {
    //分类列表展示
    Route::get('index', [ProductController::class, 'index']);
    //分类展示
    Route::get('categoryList', [ProductController::class, 'categoryList']);
    //分类添加入库
    Route::post('save', [ProductController::class, 'save']);
    //分类图标上传
    Route::post('upload', [ProductController::class, 'upload']);
    //分类修改之前的查询
    Route::get('edit/{id}', [ProductController::class, 'edit']);
    //分类修改
    Route::post('updateCategory/{id}', [ProductController::class, 'updateCategory']);
    //分类删除
    Route::get('delCategory/{id}', [ProductController::class, 'delete']);
    //分类状态修改
    Route::get('change/{id}', [ProductController::class, 'change']);
});
Route::prefix('goods')->group(function () {
    //获取商品列表
    Route::get('goodsList', [ProductController::class, 'goodsList']);
    //排行榜
    Route::get('rankList', [ProductController::class, 'rankList']);
    //订单信息物流跟踪
    Route::get('express', [ProductController::class, 'express']);
    //根据订单生成二维码
    Route::get('qrCode', [\App\Http\Controllers\web\OrderController::class, 'qrCode']);
    //提货
    Route::get('pickUp', [\App\Http\Controllers\web\OrderController::class, 'pickUp']);

});
//我的账户信息展示
Route::get('perDetails/{uid}', [UserLoginController::class, 'perDetails']);

//*** why
Route::prefix('remark')->group(function () {
    //全部评论
    Route::get('shopRemarkAll', [\App\Http\Controllers\web\ShopController::class, 'shopRemarkAll']);
    //删除评论
    Route::get('shopRemarkDel', [\App\Http\Controllers\web\ShopController::class, 'shopRemarkDel']);

    //热卖推荐
    Route::get('recommendShop', [\App\Http\Controllers\web\ShopController::class, 'recommendShop']);

    Route::get('manhattans', [\App\Http\Controllers\web\ShopController::class, 'manhattans']);
    //回复
    Route::post('reply', [\App\Http\Controllers\web\ShopController::class, 'reply']);
    //添加虚拟数据
    Route::post('shopRemarkAdd', [\App\Http\Controllers\web\ShopController::class, 'shopRemarkAdd']);
    //七牛云上传
    Route::post('remarkImageUpload', [\App\Http\Controllers\web\ShopController::class, 'remarkImageUpload']);
    //搜索
    Route::post('shopRemarkSearch', [\App\Http\Controllers\web\ShopController::class, 'shopRemarkSearch']);

});
//后台订单类
//订单查询
Route::get('OrderInquiry', [\App\Http\Controllers\web\OrderController::class, 'OrderInquiry']);
//订单增加
Route::post('OrderAdd', [\App\Http\Controllers\web\OrderController::class, 'OrderAdd']);
Route::prefix('member')->group(function () {
    Route::post('OrderAdd', [\App\Http\Controllers\web\OrderController::class, 'OrderAdd']);
//订单后台删除
    Route::post('OrderDelete', [\App\Http\Controllers\web\OrderController::class, 'OrderDelete']);
//订单后台支付状态修改
    Route::post('OrDerUpdate', [\App\Http\Controllers\web\OrderController::class, 'OrderUpdate']);
//提货
    Route::prefix('/')->group(function () {
        //取货修改订单状态
        Route::post('status_update', [\App\Http\Controllers\web\ProductBoundController::class, 'statusUpdate']);
        //订单列表
        Route::get('dist', [\App\Http\Controllers\web\ProductBoundController::class, 'dist']);
    });

//后台订单类
//订单查询
    Route::get('OrderInquiry', [\App\Http\Controllers\web\OrderController::class, 'OrderInquiry']);
//订单增加
    Route::post('OrderAdd', [\App\Http\Controllers\web\OrderController::class, 'OrderAdd']);


    Route::prefix('member')->group(function () {
//    会员类型*
        Route::get('memberType', [\App\Http\Controllers\web\MemberController::class, 'memberType']);

//    会员类型添加
        Route::get('memberTypeAdd', [\App\Http\Controllers\web\MemberController::class, 'memberTypeAdd']);
        Route::post('memberTypeAdd', [\App\Http\Controllers\web\MemberController::class, 'memberTypeAdd']);
        Route::get('memberType', [\App\Http\Controllers\web\MemberController::class, 'memberType']);
//    会员类型添加
        Route::get('memberTypeAdd', [\App\Http\Controllers\web\MemberController::class, 'memberTypeAdd']);
//    会员类型删除
        Route::get('memberTypeDel', [\App\Http\Controllers\web\MemberController::class, 'memberTypeDel']);
//    会员类型修改
        Route::get('memberTypeEditor', [\App\Http\Controllers\web\MemberController::class, 'memberTypeEditor']);
//    会员类型是否开启
        Route::get('memberTypeBegin', [\App\Http\Controllers\web\MemberController::class, 'memberTypeBegin']);
        Route::get('memberTypeBegin', [\App\Http\Controllers\web\MemberController::class, 'memberTypeBegin']);
//    会员权益*
        Route::get('memberEquity', [\App\Http\Controllers\web\MemberController::class, 'memberEquity']);
//    会员权益编辑
        Route::get('memberEquityEditor', [\App\Http\Controllers\web\MemberController::class, 'memberEquityEditor']);
//    卡密会员
        Route::get('memberSiberian', [\App\Http\Controllers\web\MemberController::class, 'memberSiberian']);
//    生成卡密
        Route::get('SiberianCreate', [\App\Http\Controllers\web\MemberController::class, 'SiberianCreate']);
//    批量添加卡密会员
        Route::get('memberSiberianAdd', [\App\Http\Controllers\web\MemberController::class, 'memberSiberianAdd']);
//    卡密激活
        Route::get('siberianActivate', [\App\Http\Controllers\web\MemberController::class, 'siberianActivate']);
//    卡密会员搜索
        Route::get('memberSiberianSearch', [\App\Http\Controllers\web\MemberController::class, 'memberSiberianSearch']);

        Route::get('memberSiberianSearch', [\App\Http\Controllers\web\MemberController::class, 'memberSiberianSearch']);


//    会员记录
        Route::get('memberRecord', [\App\Http\Controllers\web\MemberController::class, 'memberRecord']);
//    会员记录搜索

        Route::get('memberRecodeSearch', [\App\Http\Controllers\web\MemberController::class, 'memberRecodeSearch']);
    });
    Route::get('memberRecodeSearch', [\App\Http\Controllers\web\MemberController::class, 'memberRecodeSearch']);
});
// szk
Route::prefix('discount')->group(function () {
    // 优惠券添加
    Route::post('/create', [\App\Http\Controllers\web\DiscountCouponController::class, 'create']);
    // 优惠券列表
    Route::get('/listview', [\App\Http\Controllers\web\DiscountCouponController::class, 'listview']);
    // 优惠券状态(点改)
    Route::get('/change/status', [\App\Http\Controllers\web\DiscountCouponController::class, 'changeStatus']);
    // 优惠券删除
    Route::delete('/delete/{id}', [\App\Http\Controllers\web\DiscountCouponController::class, 'delete']);
    // 优惠券详情查看
    Route::get('/read/{id}', [\App\Http\Controllers\web\DiscountCouponController::class, 'read']);
    // 优惠券修改
    Route::post('/update/{id}', [\App\Http\Controllers\web\DiscountCouponController::class, 'modification']);
    // 优惠券附表添加
    Route::post('/issue/create', [\App\Http\Controllers\web\DiscountCouponController::class, 'attachedCreate']);

    // 优惠券表总添加数据信息
    Route::post('/add', [\App\Http\Controllers\web\DiscountCouponController::class, 'add']);

    // 优惠券附表修改
    Route::post('/issue/update/{id}', [\App\Http\Controllers\web\DiscountCouponController::class, 'attachedUpdate']);
    // 查询个人的优惠券
    Route::get('/user/list/{id}', [\App\Http\Controllers\web\DiscountCouponController::class, 'userList']);
    // 用户领取优惠券
    Route::post('/user/add', [\App\Http\Controllers\web\DiscountCouponController::class, 'useradd']);
    // 商品数据
    Route::get('/getGoods', [\App\Http\Controllers\web\DiscountCouponController::class, 'getGoods']);
});

//wf
Route::prefix('head')->group(function () {
    //申请团长
    Route::post('applyHead', [\App\Http\Controllers\web\HeadController::class, 'applyHead']);
    //团长列表
    Route::get('headList', [\App\Http\Controllers\web\HeadController::class, 'headList']);
    //团长状态列表
    Route::get('headStatus', [\App\Http\Controllers\web\HeadController::class, 'headStatus']);
    //通过/不通过
    Route::get('adopt', [\App\Http\Controllers\web\HeadController::class, 'adopt']);
    //团长管理列表
    Route::get('adminHeadList', [\App\Http\Controllers\web\HeadController::class, 'adminHeadList']);
    //团长修改
    Route::get('adminUpdateHead', [\App\Http\Controllers\web\HeadController::class, 'adminUpdateHead']);
    //核销员删除
    Route::get('delVerifier', [\App\Http\Controllers\web\StoreMemberController::class, 'delVerifier']);
    //核销员列表
    Route::get('verifierList', [\App\Http\Controllers\web\StoreMemberController::class, 'verifierList']);
    //添加核销员
    Route::get('addMember', [\App\Http\Controllers\web\StoreMemberController::class, 'addMember']);
    //团员列表
    Route::get('memberList', [\App\Http\Controllers\web\StoreMemberController::class, 'memberList']);
     //团长es搜索
    Route::get('search',[\App\Http\Controllers\web\HeadController::class,'search']);
    //拼团商品列表
    Route::get('combinationList', [\App\Http\Controllers\web\GroupController::class, 'combinationList']);

    Route::get('memberRecodeSearch', [\App\Http\Controllers\web\MemberController::class, 'memberRecodeSearch']);

});
